import request from '@/utils/request'

// 查询零件分类列表
export function listPartCategory(query) {
  return request({
    url: '/neo/partCategory/list',
    method: 'get',
    params: query
  })
}

// 查询零件分类详细
export function getPartCategory(categoryId) {
  return request({
    url: '/neo/partCategory/' + categoryId,
    method: 'get'
  })
}

// 新增零件分类
export function addPartCategory(data) {
  return request({
    url: '/neo/partCategory',
    method: 'post',
    data: data
  })
}

// 修改零件分类
export function updatePartCategory(data) {
  return request({
    url: '/neo/partCategory',
    method: 'put',
    data: data
  })
}

// 删除零件分类
export function delPartCategory(categoryNames) {
  return request({
    url: '/neo/partCategory/' + categoryNames,
    method: 'delete'
  })
}
